package com.cipe.cmrs.model;

import java.util.List;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * 
 * <p>
 * Pojo mapping TABLE dbo.FieldOffice
 * </p>
 * 
 * <p>
 * Generated at Sat Dec 03 14:39:43 PKT 2011
 * </p>
 * 
 * @author Incepio
 * 
 */
@Entity
@Table(name = "fieldoffice")
@SuppressWarnings("serial")
public class Fieldoffice extends BaseAuditEntity {

	/**
	 * Attribute fieldOfficeDesc.
	 */
	@Transient
	private String		description;
	
	private String fieldofficecode;
	private String address1;
	private String address2;
	private String city;
	private String contactemail;
	private String contactname;
	private String contactphone;
	private String contactfax;
	private String emailaddress;
	private String phone;
	private String fax;
	private Boolean inactive;
	
    @ManyToOne(fetch = FetchType.LAZY)
	private State stateprovince; 
    @ManyToOne(fetch = FetchType.LAZY)
	private Country countryid;
    @ManyToOne(fetch = FetchType.LAZY)
	private Region regionid;
	
	/**
	 * Attribute displayName.
	 */
	@Basic
	@Column(name = "fieldofficename", length = 500)
	private String		displayName;
	/**
	 * List of User
	 */
	@OneToMany(mappedBy = "fieldoffice")
	private List<User>	users	= null;

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @return the displayName
	 */
	public String getDisplayName() {
		return displayName;
	}

	/**
	 * @return the users
	 */
	public List<User> getUsers() {
		return users;
	}

	/**
	 * @param description the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @param displayName the displayName to set
	 */
	public void setDisplayName(String displayName) {
		this.displayName = displayName;
	}

	/**
	 * @param users the users to set
	 */
	public void setUsers(List<User> users) {
		this.users = users;
	}

	public String getFieldofficecode() {
		return fieldofficecode;
	}

	public void setFieldofficecode(String fieldofficecode) {
		this.fieldofficecode = fieldofficecode;
	}

	public String getAddress1() {
		return address1;
	}

	public void setAddress1(String address1) {
		this.address1 = address1;
	}

	public String getAddress2() {
		return address2;
	}

	public void setAddress2(String address2) {
		this.address2 = address2;
	}

	public String getCity() {
		return city;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public String getContactemail() {
		return contactemail;
	}

	public void setContactemail(String contactemail) {
		this.contactemail = contactemail;
	}

	public String getContactname() {
		return contactname;
	}

	public void setContactname(String contactname) {
		this.contactname = contactname;
	}

	public String getContactphone() {
		return contactphone;
	}

	public void setContactphone(String contactphone) {
		this.contactphone = contactphone;
	}

	public String getContactfax() {
		return contactfax;
	}

	public void setContactfax(String contactfax) {
		this.contactfax = contactfax;
	}

	public String getEmailaddress() {
		return emailaddress;
	}

	public void setEmailaddress(String emailaddress) {
		this.emailaddress = emailaddress;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getFax() {
		return fax;
	}

	public void setFax(String fax) {
		this.fax = fax;
	}

	public Boolean getInactive() {
		return inactive;
	}

	public void setInactive(Boolean inactive) {
		this.inactive = inactive;
	}

	public State getStateprovince() {
		return stateprovince;
	}

	public void setStateprovince(State stateprovince) {
		this.stateprovince = stateprovince;
	}

	public Country getCountryid() {
		return countryid;
	}

	public void setCountryid(Country countryid) {
		this.countryid = countryid;
	}

	public Region getRegionid() {
		return regionid;
	}

	public void setRegionid(Region regionid) {
		this.regionid = regionid;
	}
}